Method: BigDecimal#<=
- Defined in:
- bigdecimal.c
#<=(other) ⇒ Boolean
Returns true
if self
is less or equal to than other
, false
otherwise:
b = BigDecimal('1.5') # => 0.15e1
b <= 2 # => true
b <= 2.0 # => true
b <= Rational(2, 1) # => true
b <= 1.5 # => true
b < 1 # => false
Raises an exception if the comparison cannot be made.
1713 1714 1715 1716 1717 |
# File 'bigdecimal.c', line 1713
static VALUE
BigDecimal_le(VALUE self, VALUE r)
{
return BigDecimalCmp(self, r, 'L');
}
|